package com.kmxd.ams.client.system.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.kmxd.ams.client.oss.vo.OssAttachmentListVO;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 通知公告
 *
 * @author ZuoLG
 * @since 2022-07-15
 */
@Data
@Schema(description = "通知公告对象")
public class SysNoticeListVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "标题")
  private String title;

  @Schema(description = "单位id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  @Schema(description = "通告类型")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long type;

  @Schema(description = "内容")
  private String content;

  @Schema(description = "开始时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date startTime;

  @Schema(description = "结束时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endTime;

  @Schema(description = "是否置顶 0不置顶，1置顶")
  private Boolean priority;

  @Schema(description = "发布状态（0未发布，1已发布，2已撤销）")
  private Integer status;

  @Schema(description = "发布时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date sendTime;

  @Schema(description = "排序")
  private Integer sort;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @Schema(description = "删除状态(0-正常,1-已删除)")
  private Long delFlag;

  @Schema(description = "附件")
  private List<OssAttachmentListVO> file;
}
